<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<title>Reference for unit 'Parsers'</title>
<link rel="stylesheet" href="../fpdoc.css" type="text/css">

</head>
<body>
<table class="bar" width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td><b>[Overview][<a href="../parsers/index-4.html">Classes</a>][<a href="../parsers/index-8.html">Index</a>]</b></td>
<td align="right"><span class="bartitle">Reference for unit 'Parsers' (<a href="../index.html">#FPDOCP</a>)</span></td>
</tr>
</table>
<h1>Reference for unit 'Parsers'</h1>
<p>Main source code analyzer and parser for FPDOC.</p>
<table cellpadding="0" cellspacing="0">
<tr>
<td><p><tt><span class="code"><span class="kw">uses</span></span></tt></p></td>
</tr>
<tr>
<td valign="top"><p><tt><span class="code">&nbsp;&nbsp;SysUtils<span class="sym">,</span>  </span></tt></p></td>
</tr>
<tr>
<td valign="top"><p><tt><span class="code">&nbsp;&nbsp;Classes<span class="sym">,</span>  </span></tt></p></td>
</tr>
<tr>
<td valign="top"><p><tt><span class="code">&nbsp;&nbsp;StrUtils<span class="sym">,</span>  </span></tt></p></td>
</tr>
<tr>
<td valign="top"><p><tt><span class="code">&nbsp;&nbsp;<a href="../utils/index.html">Utils</a><span class="sym">,</span>  </span></tt></p></td>
<td><p>&nbsp;&nbsp;</p></td>
<td><p class="cmt">Various utility functions, string to array conversion routines, command line argument parsing</p></td>
</tr>
<tr>
<td valign="top"><p><tt><span class="code">&nbsp;&nbsp;<a href="../charsets/index.html">Charsets</a><span class="sym">;</span>  </span></tt></p></td>
<td><p>&nbsp;&nbsp;</p></td>
<td><p class="cmt">Conversion between ISO-8859-2, CP1250, CP852, UTF-8</p></td>
</tr>
</table>
<h2>Overview</h2>
<p>Read source code, find special comments {* ... }, or //* and create entries in FPDOC XML file<br><br><b>Big comments</b><br><br>  Big comments are used only for documentation of unit and procedures/functions/methods.<br>  Anything between {* and } is big comment.<br>  Because of the simpler implementation, these special marks must be on stand alone lines.<br><br><b>Éxample of big comment</b><br><br>  {*<br>  This is summary<br>  This is long description, it should have multiple<br>  lines if required, may be formated like<br>  HTML and so on.<br>  @errors This code will throw exception EFooBar if file xyz doesn't exist<br>  @seealso Here,Can,Be,Elements,Separated,By,Colon<br>  }<br><br><b>Small comments</b><br><br>  Small comments are used for documentation of Types, Variables, Constants and class attributes.<br>  Anything after //* is small comment.<br>  First word in line with //* is commented element.<br>  Notice that you must put "type" or "const" or "var" to stand alone file so it will not be first word of commented line.<br><br><b>Example of small comment</b><br><br>  type<br>    TSomeThing = array[1..3] of integer = (1,2,3); //* Description of TSomeThing<br><br><b>Common mistakes</b><br><br>  foo : integer; {* incorect use of big comment }<br><br>  foo : integer; // missing asterisk in small comment<br><br>  {* Summary cannot be here<br>  Detailed multiline<br>  text follows.<br>  }<br><br>  function foo : integer; //* small comments will work too, but you should rather use big comment for functions!<br><br>  function foo : integer;<br>  function bar : integer;<br>  {*<br>  This is correct comment of BAR<br>  }<br>  begin<br>    result := 123;<br>  end;<br>  {*<br>  Big comment should be right after FOO<br>  }<br>  begin<br>    result := bar * 2;<br>  end;<br><br>  type<br>    TSomeClass = class<br>      foo : integer; //* Foo - it will not work, because you did not commented TSomeClass, therefore FPDOCP do knot know FOO is attribute of TSomeClass<br>    end;<br></p>
</body>
</html>
